/*
 *   The contents of this file are subject to the Mozilla Public License
 *   Version 1.1 (the "License"); you may not use this file except in
 *   compliance with the License. You may obtain a copy of the License at
 *   http://www.mozilla.org/MPL/
 *
 *   Software distributed under the License is distributed on an "AS IS"
 *   basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
 *   License for the specific language governing rights and limitations
 *   under the License.
 *
 *   The Original Code is OkkamNGClient, in the package org.okkam.client.*.
 *
 *   The Initial Developer of the Original Code is 
 *		Heiko Stoermer (http://disi.unitn.it/~stoermer).
 *
 *   Portions created by the Initial Developer are Copyright (C) 2007
 *   the Initial Developer. All Rights Reserved.
 *
 *   Contributor(s): Daniel Giacomuzzi (etadaniel@gmail.com).
 *
*/

/*
 * OkkamURIResult.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
 */

package org.okkam.core.api.data;

public class OkkamURIResult  implements java.io.Serializable {
    private int code;

    private float[] confidences;

    private java.lang.String message;

    private java.lang.String[] result;

    public OkkamURIResult() {
    }

    public OkkamURIResult(
           int code,
           float[] confidences,
           java.lang.String message,
           java.lang.String[] result) {
           this.code = code;
           this.confidences = confidences;
           this.message = message;
           this.result = result;
    }


    /**
     * Gets the code value for this OkkamURIResult.
     * 
     * @return code
     */
    public int getCode() {
        return code;
    }


    /**
     * Sets the code value for this OkkamURIResult.
     * 
     * @param code
     */
    public void setCode(int code) {
        this.code = code;
    }


    /**
     * Gets the confidences value for this OkkamURIResult.
     * 
     * @return confidences
     */
    public float[] getConfidences() {
        return confidences;
    }


    /**
     * Sets the confidences value for this OkkamURIResult.
     * 
     * @param confidences
     */
    public void setConfidences(float[] confidences) {
        this.confidences = confidences;
    }


    /**
     * Gets the message value for this OkkamURIResult.
     * 
     * @return message
     */
    public java.lang.String getMessage() {
        return message;
    }


    /**
     * Sets the message value for this OkkamURIResult.
     * 
     * @param message
     */
    public void setMessage(java.lang.String message) {
        this.message = message;
    }


    /**
     * Gets the result value for this OkkamURIResult.
     * 
     * @return result
     */
    public java.lang.String[] getResult() {
        return result;
    }


    /**
     * Sets the result value for this OkkamURIResult.
     * 
     * @param result
     */
    public void setResult(java.lang.String[] result) {
        this.result = result;
    }

    private java.lang.Object __equalsCalc = null;
    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof OkkamURIResult)) return false;
        OkkamURIResult other = (OkkamURIResult) obj;
        if (obj == null) return false;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true && 
            this.code == other.getCode() &&
            ((this.confidences==null && other.getConfidences()==null) || 
             (this.confidences!=null &&
              java.util.Arrays.equals(this.confidences, other.getConfidences()))) &&
            ((this.message==null && other.getMessage()==null) || 
             (this.message!=null &&
              this.message.equals(other.getMessage()))) &&
            ((this.result==null && other.getResult()==null) || 
             (this.result!=null &&
              java.util.Arrays.equals(this.result, other.getResult())));
        __equalsCalc = null;
        return _equals;
    }

    private boolean __hashCodeCalc = false;
    public synchronized int hashCode() {
        if (__hashCodeCalc) {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = 1;
        _hashCode += getCode();
        if (getConfidences() != null) {
            for (int i=0;
                 i<java.lang.reflect.Array.getLength(getConfidences());
                 i++) {
                java.lang.Object obj = java.lang.reflect.Array.get(getConfidences(), i);
                if (obj != null &&
                    !obj.getClass().isArray()) {
                    _hashCode += obj.hashCode();
                }
            }
        }
        if (getMessage() != null) {
            _hashCode += getMessage().hashCode();
        }
        if (getResult() != null) {
            for (int i=0;
                 i<java.lang.reflect.Array.getLength(getResult());
                 i++) {
                java.lang.Object obj = java.lang.reflect.Array.get(getResult(), i);
                if (obj != null &&
                    !obj.getClass().isArray()) {
                    _hashCode += obj.hashCode();
                }
            }
        }
        __hashCodeCalc = false;
        return _hashCode;
    }

    // Type metadata
    private static org.apache.axis.description.TypeDesc typeDesc =
        new org.apache.axis.description.TypeDesc(OkkamURIResult.class, true);

    static {
        typeDesc.setXmlType(new javax.xml.namespace.QName("http://data.api.core.okkam.org", "OkkamURIResult"));
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("code");
        elemField.setXmlName(new javax.xml.namespace.QName("http://data.api.core.okkam.org", "code"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("confidences");
        elemField.setXmlName(new javax.xml.namespace.QName("http://data.api.core.okkam.org", "confidences"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "float"));
        elemField.setNillable(true);
        elemField.setItemQName(new javax.xml.namespace.QName("http://webservice.okkam.org", "item"));
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("message");
        elemField.setXmlName(new javax.xml.namespace.QName("http://data.api.core.okkam.org", "message"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("result");
        elemField.setXmlName(new javax.xml.namespace.QName("http://data.api.core.okkam.org", "result"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(true);
        elemField.setItemQName(new javax.xml.namespace.QName("http://webservice.okkam.org", "item"));
        typeDesc.addFieldDesc(elemField);
    }

    /**
     * Return type metadata object
     */
    public static org.apache.axis.description.TypeDesc getTypeDesc() {
        return typeDesc;
    }

    /**
     * Get Custom Serializer
     */
    public static org.apache.axis.encoding.Serializer getSerializer(
           java.lang.String mechType, 
           java.lang.Class _javaType,  
           javax.xml.namespace.QName _xmlType) {
        return 
          new  org.apache.axis.encoding.ser.BeanSerializer(
            _javaType, _xmlType, typeDesc);
    }

    /**
     * Get Custom Deserializer
     */
    public static org.apache.axis.encoding.Deserializer getDeserializer(
           java.lang.String mechType, 
           java.lang.Class _javaType,  
           javax.xml.namespace.QName _xmlType) {
        return 
          new  org.apache.axis.encoding.ser.BeanDeserializer(
            _javaType, _xmlType, typeDesc);
    }

}
